/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import com.fasterxml.jackson.annotation.JsonBackReference;
import entidades.miembros.Socio;
import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 * @author Felipe
 */
@Entity
@Table (name = "DOMICILIOS")
public class Domicilio implements Serializable
{
    @Id
    @Column (name = "ID_DOMICILIO")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    
    @Column (name = "CALLE")
    private String calle;
    @Column (name = "ALTURA")
    private int altura;
    @OneToOne (cascade = {CascadeType.ALL})
    private Ubicacion ubicacion;
    
    public Domicilio ()
    {
        
    }
    
    public Domicilio (String calle, int altura, Ubicacion ubicacion)
    {
        this.calle = calle;
        this.altura = altura;
        this.ubicacion = ubicacion;
    }
    
    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public String getCalle()
    {
        return calle;
    }

    public void setCalle(String calle)
    {
        this.calle = calle;
    }

    public int getAltura()
    {
        return altura;
    }

    public void setAltura(int altura)
    {
        this.altura = altura;
    }

    public Ubicacion getUbicacion()
    {
        return ubicacion;
    }

    public void setUbicacion(Ubicacion ubicacion)
    {
        this.ubicacion = ubicacion;
    }
}
